<template>
  <view v-if="shenheStatus == 0" class="applySuccess">
    <view class="result">
      <i class="iconfont icon-success-fill"></i>
      <view class="tit">提交成功！</view>
      <view class="des">恭喜您，提交成功！</view>
    </view>
    <view class="btn">返回（{{ num }}）</view>
  </view>
  <Shenhe v-else-if="shenheStatus == 1"></Shenhe>
</template>

<script>
import Shenhe from "@/components/shenhe/shenhe";
export default {
  components: {
    Shenhe
  },
  data() {
    return {
      num: 3
    };
  },

  onLoad() {
    this.init();
  },

  methods: {
    init() {
      if (!this.num) {
        setTimeout(() => {
          this.$utils.goBack(1);
        }, 1000);

        return;
      }
      setTimeout(() => {
        this.num -= 1;
        this.init();
      }, 1000);
    }
  }
};
</script>

<style lang="scss" scoped>
.applySuccess {
  min-height: 100vh;
  background: #f2f2f2;
}

.result {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30rpx 0 70rpx;

  .icon-success-fill {
    color: #f0250e;
    font-size: 180rpx;
  }

  .tit {
    padding-bottom: 20rpx;
    font-size: 40rpx;
    color: #262626;
    font-weight: bold;
  }

  .des {
    font-size: 30rpx;
    color: #8c8c8c;
  }
}

.btn {
  margin: 80rpx 36rpx 0;
  height: 88rpx;
  line-height: 88rpx;
  border-radius: 32px;
  background: #f0250e;
  color: #fff;
  font-size: 32rpx;
  text-align: center;
}
</style>
